home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 May / 1984-05.d64 / begin corner_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  42 lines

  1. 5 rem stepping up or down
  2. 10 poke53281,1:goto 100
  3. 20 print"press return"
  4. 22 geta$:ifa$=""then22
  5. 24 if asc(a$)<>13then22
  6. 26 return
  7. 30 poke w,17:for d=1 to 80:next d:poke w,0:return
  8. 40 poke w,17:for d=1 to 500:next d:poke w,0:return
  9. 100 print"[147]":printtab(10)"stepping up or down"
  10. 110 print"you will see two notes.":print"from the first one, do you move up,"
  11. 120 print"move down, or stay the same to play the second note?"
  12. 130 print"press  f1 for up":printtab(7)"f3 for same":printtab(7)"f5 for down"
  13. 140 l$="[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  14. 150 for i=0to8:readhf(i),lf(i):next
  15. 160 data 44,193,42,62,37,162,33,135,31,165,28,49,25,30,22,96,21,31
  16. 170 b(1)=135:b(2)=134:b(3)=133
  17. 175 poke 54296,15:v1=54273:v2=54272:w=54276:poke 54277,64:poke 54278,128
  18. 180 gosub20
  19. 190 sc=0:for t=1 to 10
  20. 200 print"[147][144]":for i=1to5:printl$:next
  21. 210 n1=int(9*rnd(0)):p1=1280+n1*40
  22. 220 poke p1,81:poke p1+54272,2
  23. 230 n2=int(9*rnd(0)):p2=1287+n2*40
  24. 240 poke p2,81:poke p2+54272,2
  25. 250 a=sgn(n1-n2)+2:fl=0
  26. 260 poke v1,112:poke v2,199:gosub 30
  27. 270 print"f1  up":print"f3  same":print"f5  down"
  28. 280 get a$:if a$=""then 280
  29. 290 if asc(a$)<133 or asc(a$)>135 then 280
  30. 300 if asc(a$)=b(a) then 350
  31. 310 fl=1:poke v1,10:poke v2,143:gosub 30
  32. 320 poke v1,8:poke v2,97:gosub 30:goto 280
  33. 350 poke v1,hf(n1):poke v2,lf(n1):gosub 40
  34. 360 poke v1,hf(n2):poke v2,lf(n2):gosub 40
  35. 370 if fl=0 then sc=sc+1
  36. 380 next t
  37. 390 print "score = ";sc;"out of 10"
  38. 400 print "try again? (y/n)"
  39. 410 get a$:if a$="y" then 190
  40. 420 if a$<>"n" then 410
  41. 430 print"[147]":end
  42.